<!-- 生日墙 -->
<div class="col-md-6 col-md-offset-3">
	<div class="panel panel-default">
		<div class="panel-heading" style="text-align: center;">
			<div><%= DT.todayStr() %></div>
		</div>
		<div class="panel-body" style="padding-bottom: 0px;">
			<ul class="pagination">
				<% for (let i = 1; i <= 12; i++) { %>
				<li class="<%=i==(yue||DT.today.nongM)?'active':''%>"><a href="javascript:wall(<%=i%>);" style="<%=i==11?'padding: 6px 5px;':''%>"><%=DT.getYue(i)%>月</a></li>
				<% } %>
			</ul>
		</div>
		<div class="panel-body" style="padding-bottom: 0px;">
			<div class="list-group" style="line-height: 18px; margin-bottom: 10px;">
				<% for (let i = 0; i < data.length; i++) { var p = EJS.person(data[i]); %>
				<div class="list-group-item" style="text-align: center;">
					<div>
						<span style="font-weight: bold;font-size: large;"><%=p.name%></span>
						<span><%=p.sex%> <%=p.age%>岁 <%=DT.getXinZuo(p.gong)%> <%=p.nongStr%></span>
					</div>
					<div>
						<% if (DT.full(p.nong).substr(6) == DT.full(DT.today.nong).substr(6)) { %>
							<span style=""><a>🎂 今日寿星 🎂</a></span>
						<% } else { %>
							<i>农历生日 <a>还有<span style="font-size: large;" getVal="<%=p.nong%>">...</span>天</a> <%=p.age + 1%>周岁</i>
						<% } %>
					</div>
				</div>
				<% } %>
			</div>
		</div>
		<div class="panel-body" style="padding-top: 0px;">
			<ul class="pagination">
				<% for (let i = 1; i <= 12; i++) { %>
				<li class="<%=i==(yue||DT.today.nongM)?'active':''%>"><a href="javascript:wall(<%=i%>);" style="<%=i==11?'padding: 6px 5px;':''%>"><%=DT.getYue(i)%>月</a></li>
				<% } %>
			</ul>
		</div>
	</div>
</div>
<script>
	function wall(yue) {
		loadView('wall', {yue: yue});
	}
	$(function () {
		$('[getVal]').each(function () {
			var ele = $(this);
			$.get('/wall/next/' + ele.attr('getVal'), function (val) {
				ele.html(val);
			})
		})
	})
</script>